# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gegl
pkgver=0.4.24
pkgrel=1
pkgdesc="Graph based image processing framework"
url="http://www.gegl.org/"
arch="all !s390x !mips !mips64" # Limited by librsvg
license="GPL-3.0-or-later AND LGPL-3.0-or-later"
makedepends="babl-dev bash gobject-introspection-dev libpng-dev
	libjpeg-turbo-dev gtk+-dev librsvg-dev lua5.1-dev gexiv2-dev
	json-glib-dev libraw-dev libwebp-dev meson pango-dev gdk-pixbuf-dev
	ffmpeg-dev vala"
checkdepends="diffutils"
subpackages="$pkgname-dev $pkgname-lang"
source="https://download.gimp.org/pub/gegl/${pkgver%.*}/gegl-$pkgver.tar.xz"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="09d857332eeabe39327d312b1a1692b7c6c9f8f952ae3e3cc06b5a5c262757d8b86467c25a4e66c90c37922fd3548fc1342a9864732d17924f97e7b6c6c1786d  gegl-0.4.24.tar.xz"
